<template>
  <div id="app">
    <Header v-if="isShowHeader" class="header"></Header>
    <div class="content">
      <router-view v-if="isRouterAlive"></router-view>
    </div>
  </div>
</template>

<script>
  import Header from "./components/common/Header";
  export default {
    name: "App",
    components:{
      Header
    },
    data(){
      return{
        isShowHeader:true,
        isRouterAlive : true
      }
    },
    methods:{
      reload(){
        this.isRouterAlive = false
        this.$nextTick(function(){
          this.isRouterAlive = true
        })
      }
    },
    provide(){
      return{
        reload : this.reload
      }
    },
  }
</script>

<style>
  body,html{
    margin: 0;
    padding: 0;
  }
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  /*width: 100vw;*/
}
.header{
  position: sticky;
  top: 0;
  z-index: 9;
}

  .content{
    /*width: 1500px;*/
    width: 100%;
    /*width: 100%;*/
    margin: 0 auto;
    /*height: calc(100vh );*/
  }

</style>
